package com.cn.gxa.springjpa;

import com.cn.gxa.springjpa.bean.Admin;
import com.cn.gxa.springjpa.bean.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@SpringBootApplication
@EnableJpaAuditing //开启jpa
@EnableJpaRepositories(basePackages= {"com.cn.gxa.springjpa.dao"})//扫描dao注解
@EntityScan(basePackages = {"com.cn.gxa.springjpa.bean"})//扫描实体类注解
public class SpringjpaApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringjpaApplication.class, args);
        Admin  admin=new Admin();
        System.out.println(admin);
        Admin admin1=new  Admin(1,"韩梅梅");
        System.out.println(admin1);
    }

}
